package practice06;

import practice07.Klass;

public class Teacher extends Person{
    private int Klass;
    public Teacher(String name, int age, int Klass){
        super(name,age);
        this.Klass = Klass;
    }

    public Teacher(String name, int age) {
        super(name,age);
    }

    public int getKlass() {
        return Klass;
    }
    public String introduce() {
        if (Klass != 0) {
            return "My name is "+getName()+". I am "+getAge()+" years old. I am a Teacher. I teach Class "+ Klass +".";
        }
        else {
            return "My name is "+ getName()+". I am "+ getAge() +" years old. I am a Teacher. I teach No Class.";
        }

    }


}
